htmltools::includeMarkdown('indice.md')
pltnts <- list.files("~/R/terni/rds", pattern = "^[A-L]", full.names = TRUE)
map(pltnts, \(pltnt) {
inquinante <- tools::file_path_sans_ext(basename(pltnt))
cat("\n## ", inquinante, "\n\n")
df <- read_csv("~/R/terni/data/dataframes/df_finale.csv", show_col_types = FALSE)
index <- grep(inquinante, names(df))
names(df)[index] <- "value"
rds <- readRDS(pltnt)
mod <- getModel(names(rds), df)
gamtabs(mod, type = "HTML")
cat("\n\n")
cat("R²:", summary(mod)$r.sq %>% round(3) )
cat("\n\n")
# stargazer(mod, type="text" )
appraise(mod) %>% print()
draw(mod) %>% print()
rm(mod)
cat("\n\n")
})
R²: 0.275
R²: 0.647
stringa modello: gam(log(value) ~ s(pbl12_median) , gamma=1.4, family=gaussian(link=log), data = df)
## Warning in log(mu): Si è prodotto un NaN
R²: -0.004
stringa modello: gam(log(value) ~ s(cold_area) , gamma=1.4, family=gaussian(link=log), data = df)
## Warning in log(mu): Si è prodotto un NaN
| A. parametric coefficients | Estimate | Std. Error | t-value | p-value |
| (Intercept) | -24.3739 | 1470767797.3404 | -0.0000 | 1.0000 |
| B. smooth terms | edf | Ref.df | F-value | p-value |
| s(cold_area) | 1.0000 | 1.0000 | 0.0000 | 1.0000 |
R²: -0.004
| A. parametric coefficients | Estimate | Std. Error | t-value | p-value |
| (Intercept) | -8.2656 | 72.9295 | -0.1133 | 0.9098 |
| B. smooth terms | edf | Ref.df | F-value | p-value |
| s(pwspeed_IQR) | 4.9512 | 5.0933 | 3.7966 | 0.0020 |
R²: 0.39
| A. parametric coefficients | Estimate | Std. Error | t-value | p-value |
| (Intercept) | -23.9984 | 1108.9985 | -0.0216 | 0.9828 |
| B. smooth terms | edf | Ref.df | F-value | p-value |
| s(wspeed_max) | 8.0000 | 8.0001 | 6.7448 | < 0.0001 |
R²: 0.494
R²: 0.68
R²: 0.658
stringa modello: gam(log(value) ~ s(wdir_min) , gamma=1.4, family=gaussian(link=log), data = df)
## Warning in log(mu): Si è prodotto un NaN
| A. parametric coefficients | Estimate | Std. Error | t-value | p-value |
| (Intercept) | -23.3786 | 728888923.6442 | -0.0000 | 1.0000 |
| B. smooth terms | edf | Ref.df | F-value | p-value |
| s(wdir_min) | 1.0000 | 1.0000 | 0.0000 | 1.0000 |
R²: -0.004
stringa modello: gam(log(value) ~ s(kndvi) , gamma=1.4, family=gaussian(link=log), data = df)
## Warning in log(mu): Si è prodotto un NaN
| A. parametric coefficients | Estimate | Std. Error | t-value | p-value |
| (Intercept) | -22.7952 | 820896902.7941 | -0.0000 | 1.0000 |
| B. smooth terms | edf | Ref.df | F-value | p-value |
| s(kndvi) | 1.0000 | 1.0000 | 0.0000 | 1.0000 |
R²: -0.004
R²: 0.451
R²: 0.529
stringa modello: gam(log(value) ~ s(s5_sup_200, k=9) , gamma=1.4, family=gaussian(link=log), data = df)
## Warning in log(mu): Si è prodotto un NaN
| A. parametric coefficients | Estimate | Std. Error | t-value | p-value |
| (Intercept) | -22.4419 | 448071431.0465 | -0.0000 | 1.0000 |
| B. smooth terms | edf | Ref.df | F-value | p-value |
| s(s5_sup_200) | 1.0000 | 1.0000 | 0.0000 | 1.0000 |
R²: -0.004
stringa modello: gam(log(value) ~ s(v10m_min) , gamma=1.4, family=gaussian(link=log), data = df)
## Warning in log(mu): Si è prodotto un NaN
| A. parametric coefficients | Estimate | Std. Error | t-value | p-value |
| (Intercept) | -22.5796 | 387687954.4849 | -0.0000 | 1.0000 |
| B. smooth terms | edf | Ref.df | F-value | p-value |
| s(v10m_min) | 1.0000 | 1.0000 | 0.0000 | 1.0000 |
R²: -0.004
stringa modello: gam(log(value) ~ s(s7_sup_200, k=3) , gamma=1.4, family=gaussian(link=log), data = df)
## Warning in log(mu): Si è prodotto un NaN
| A. parametric coefficients | Estimate | Std. Error | t-value | p-value |
| (Intercept) | -23.4443 | 464327192.8477 | -0.0000 | 1.0000 |
| B. smooth terms | edf | Ref.df | F-value | p-value |
| s(s7_sup_200) | 1.0000 | 1.0000 | 0.0000 | 1.0000 |
R²: -0.004
stringa modello: gam(log(value) ~ s(t2m_min) , gamma=1.4, family=gaussian(link=log), data = df)
## Warning in log(mu): Si è prodotto un NaN
| A. parametric coefficients | Estimate | Std. Error | t-value | p-value |
| (Intercept) | -22.4449 | 575094374.2699 | -0.0000 | 1.0000 |
| B. smooth terms | edf | Ref.df | F-value | p-value |
| s(t2m_min) | 1.0000 | 1.0000 | 0.0000 | 1.0000 |
R²: -0.004
stringa modello: gam(log(value) ~ s(cold_area) , gamma=1.4, family=gaussian(link=log), data = df)
## Warning in log(mu): Si è prodotto un NaN
| A. parametric coefficients | Estimate | Std. Error | t-value | p-value |
| (Intercept) | -69.3581 | 262156066.4195 | -0.0000 | 1.0000 |
| B. smooth terms | edf | Ref.df | F-value | p-value |
| s(cold_area) | 1.0000 | 1.0000 | 0.0000 | 1.0000 |
R²: 0.053
stringa modello: gam(log(value) ~ s(kndvi) , gamma=1.4, family=gaussian(link=log), data = df)
## Warning in log(mu): Si è prodotto un NaN
| A. parametric coefficients | Estimate | Std. Error | t-value | p-value |
| (Intercept) | -22.8396 | 653381530.1422 | -0.0000 | 1.0000 |
| B. smooth terms | edf | Ref.df | F-value | p-value |
| s(kndvi) | 1.0000 | 1.0000 | 0.0000 | 1.0000 |
R²: -0.004
R²: 0.744
stringa modello: gam(log(value) ~ s(wdir_max) , gamma=1.4, family=gaussian(link=log), data = df)
## Warning in log(mu): Si è prodotto un NaN
| A. parametric coefficients | Estimate | Std. Error | t-value | p-value |
| (Intercept) | -22.1515 | 404332678.1999 | -0.0000 | 1.0000 |
| B. smooth terms | edf | Ref.df | F-value | p-value |
| s(wdir_max) | 1.0000 | 1.0000 | 0.0000 | 1.0000 |
R²: -0.004
stringa modello: gam(log(value) ~ s(wspeed_min, k=8) , gamma=1.4, family=gaussian(link=log), data = df)
## Warning in log(mu): Si è prodotto un NaN
| A. parametric coefficients | Estimate | Std. Error | t-value | p-value |
| (Intercept) | -22.6596 | 563533184.0973 | -0.0000 | 1.0000 |
| B. smooth terms | edf | Ref.df | F-value | p-value |
| s(wspeed_min) | 1.0000 | 1.0000 | 0.0000 | 1.0000 |
R²: -0.004
R²: 0.678
R²: 0.651
R²: 0.637
R²: 0.61
stringa modello: gam(log(value) ~ s(v10m_median, k=9) , gamma=1.4, family=gaussian(link=log), data = df)
## Warning in log(mu): Si è prodotto un NaN
| A. parametric coefficients | Estimate | Std. Error | t-value | p-value |
| (Intercept) | -22.4915 | 399086832.8146 | -0.0000 | 1.0000 |
| B. smooth terms | edf | Ref.df | F-value | p-value |
| s(v10m_median) | 1.0000 | 1.0000 | 0.0000 | 1.0000 |
R²: -0.004
stringa modello: gam(log(value) ~ s(v10m_median, k=9) , gamma=1.4, family=gaussian(link=log), data = df)
## Warning in log(mu): Si è prodotto un NaN
| A. parametric coefficients | Estimate | Std. Error | t-value | p-value |
| (Intercept) | -22.8122 | 885536862.8724 | -0.0000 | 1.0000 |
| B. smooth terms | edf | Ref.df | F-value | p-value |
| s(v10m_median) | 1.0000 | 1.0000 | 0.0000 | 1.0000 |
R²: -0.004
R²: 0.727
R²: 0.792
stringa modello: gam(log(value) ~ s(pblmin_median, k=3) , gamma=1.4, family=gaussian(link=log), data = df)
## Warning in log(mu): Si è prodotto un NaN
R²: -0.004
stringa modello: gam(log(value) ~ s(pblmin_IQR, k=9) , gamma=1.4, family=gaussian(link=log), data = df)
## Warning in log(mu): Si è prodotto un NaN
| A. parametric coefficients | Estimate | Std. Error | t-value | p-value |
| (Intercept) | -22.9853 | 1033837054.2196 | -0.0000 | 1.0000 |
| B. smooth terms | edf | Ref.df | F-value | p-value |
| s(pblmin_IQR) | 1.0000 | 1.0000 | 0.0000 | 1.0000 |
R²: -0.004
stringa modello: gam(log(value) ~ s(s7_sup_200, k=3) , gamma=1.4, family=gaussian(link=log), data = df)
## Warning in log(mu): Si è prodotto un NaN
| A. parametric coefficients | Estimate | Std. Error | t-value | p-value |
| (Intercept) | -23.1998 | 628699215.4837 | -0.0000 | 1.0000 |
| B. smooth terms | edf | Ref.df | F-value | p-value |
| s(s7_sup_200) | 1.0000 | 1.0000 | 0.0000 | 1.0000 |
R²: -0.004
stringa modello: gam(log(value) ~ s(pblmin_median, k=3) , gamma=1.4, family=gaussian(link=log), data = df)
## Warning in log(mu): Si è prodotto un NaN
R²: -0.004
[[1]] NULL
[[2]] NULL
[[3]] NULL
[[4]] NULL
[[5]] NULL
[[6]] NULL
[[7]] NULL
[[8]] NULL
[[9]] NULL
[[10]] NULL
[[11]] NULL
[[12]] NULL
[[13]] NULL
[[14]] NULL
[[15]] NULL
[[16]] NULL
[[17]] NULL
[[18]] NULL
[[19]] NULL
[[20]] NULL
[[21]] NULL
[[22]] NULL
[[23]] NULL
[[24]] NULL
[[25]] NULL
[[26]] NULL
[[27]] NULL
[[28]] NULL
[[29]] NULL
[[30]] NULL
[[31]] NULL
[[32]] NULL
[[33]] NULL